package com.tza.web.t_net.client.sceens;

import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;

public class ApplicationMenu extends HLayout
{
   String                   contents                = "Application Menu";
   private static final int APPLICATION_MENU_HEIGHT = 120;

   private Label            label;

   public ApplicationMenu()
   {

      super();
      this.setHeight(APPLICATION_MENU_HEIGHT);
      this.setWidth100();
      label = new Label();

      label.setContents(contents);
      label.setAlign(Alignment.CENTER);
      label.setOverflow(Overflow.HIDDEN);

      final TabSet topTabSet = new TabSet();
      topTabSet.setTabBarPosition(Side.TOP);
      topTabSet.setTabBarAlign(Side.LEFT);
      // topTabSet.setWidth(400);
      // topTabSet.setHeight(200);

      final Tab preferencesTab = new Tab("Preferences");
      DynamicForm preferencesForm = new DynamicForm();
      preferencesTab.setPane(preferencesForm);

      Tab profileTab = new Tab("Profile");
      DynamicForm profileForm = new DynamicForm();

      profileTab.setPane(profileForm);

      topTabSet.addTab(profileTab);
      topTabSet.addTab(preferencesTab);

      VLayout vLayout = new VLayout();
      vLayout.setMembersMargin(15);
      vLayout.addMember(topTabSet);

      this.addMember(vLayout);

   }

}
